 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKKubernetes/KubernetesModel.h>

@implementation NodeVersion
-(id) initWithVersion:(NSString*) version
      imageOs:(NSString*)imageOs
      versionStatus:(NSString*)versionStatus { 
     self.version = version;               
     self.imageOs = imageOs;               
     self.versionStatus = versionStatus;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self version])
    {
        [result setValue:[self version] forKey:@"version"];
    }
    if([self imageOs])
    {
        [result setValue:[self imageOs] forKey:@"imageOs"];
    }
    if([self versionStatus])
    {
        [result setValue:[self versionStatus] forKey:@"versionStatus"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.version = [dictionary objectForKey:@"version"];
    self.imageOs = [dictionary objectForKey:@"imageOs"];
    self.versionStatus = [dictionary objectForKey:@"versionStatus"];
    return self;
}
 @end
@implementation NodeImage
-(id) initWithCode:(NSString*) code
      imageId:(NSString*)imageId
      imageOs:(NSString*)imageOs
      mainVersion:(NSString*)mainVersion
      innerVersion:(NSString*)innerVersion
      visibility:(NSNumber*)visibility { 
     self.code = code;               
     self.imageId = imageId;               
     self.imageOs = imageOs;               
     self.mainVersion = mainVersion;               
     self.innerVersion = innerVersion;               
     self.visibility = visibility;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self imageId])
    {
        [result setValue:[self imageId] forKey:@"imageId"];
    }
    if([self imageOs])
    {
        [result setValue:[self imageOs] forKey:@"imageOs"];
    }
    if([self mainVersion])
    {
        [result setValue:[self mainVersion] forKey:@"mainVersion"];
    }
    if([self innerVersion])
    {
        [result setValue:[self innerVersion] forKey:@"innerVersion"];
    }
    if([self visibility])
    {
        [result setValue:[self visibility] forKey:@"visibility"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.code = [dictionary objectForKey:@"code"];
    self.imageId = [dictionary objectForKey:@"imageId"];
    self.imageOs = [dictionary objectForKey:@"imageOs"];
    self.mainVersion = [dictionary objectForKey:@"mainVersion"];
    self.innerVersion = [dictionary objectForKey:@"innerVersion"];
    self.visibility = [dictionary objectForKey:@"visibility"];
    return self;
}
 @end
@implementation AddonConfig
-(id) initWithName:(NSString*) name
      enabled:(NSNumber*)enabled { 
     self.name = name;               
     self.enabled = enabled;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    return self;
}
 @end
@implementation ValidNodeConfig
-(id) initWithNodeVersion:(NSString*) nodeVersion
      imageId:(NSArray<NSString*>*)imageId { 
     self.nodeVersion = nodeVersion;               
     self.imageId = imageId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self nodeVersion])
    {
        [result setValue:[self nodeVersion] forKey:@"nodeVersion"];
    }
    if([self imageId])
    {
        [result setValue:[self imageId] forKey:@"imageId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.nodeVersion = [dictionary objectForKey:@"nodeVersion"];
    self.imageId = [dictionary objectForKey:@"imageId"];
    return self;
}
 @end
@implementation NodeGroupProgress
-(id) initWithNodeGroupId:(NSString*) nodeGroupId
      action:(NSString*)action
      totalCount:(NSNumber*)totalCount
      updatedCount:(NSNumber*)updatedCount { 
     self.nodeGroupId = nodeGroupId;               
     self.action = action;               
     self.totalCount = totalCount;               
     self.updatedCount = updatedCount;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self nodeGroupId])
    {
        [result setValue:[self nodeGroupId] forKey:@"nodeGroupId"];
    }
    if([self action])
    {
        [result setValue:[self action] forKey:@"action"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    if([self updatedCount])
    {
        [result setValue:[self updatedCount] forKey:@"updatedCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.nodeGroupId = [dictionary objectForKey:@"nodeGroupId"];
    self.action = [dictionary objectForKey:@"action"];
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    self.updatedCount = [dictionary objectForKey:@"updatedCount"];
    return self;
}
 @end
@implementation DiskSpec
-(id) initWithSystemDiskCategory:(NSString*) systemDiskCategory
      systemDiskSize:(NSNumber*)systemDiskSize
      systemDiskType:(NSString*)systemDiskType
      systemDiskIops:(NSNumber*)systemDiskIops { 
     self.systemDiskCategory = systemDiskCategory;               
     self.systemDiskSize = systemDiskSize;               
     self.systemDiskType = systemDiskType;               
     self.systemDiskIops = systemDiskIops;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self systemDiskCategory])
    {
        [result setValue:[self systemDiskCategory] forKey:@"systemDiskCategory"];
    }
    if([self systemDiskSize])
    {
        [result setValue:[self systemDiskSize] forKey:@"systemDiskSize"];
    }
    if([self systemDiskType])
    {
        [result setValue:[self systemDiskType] forKey:@"systemDiskType"];
    }
    if([self systemDiskIops])
    {
        [result setValue:[self systemDiskIops] forKey:@"systemDiskIops"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.systemDiskCategory = [dictionary objectForKey:@"systemDiskCategory"];
    self.systemDiskSize = [dictionary objectForKey:@"systemDiskSize"];
    self.systemDiskType = [dictionary objectForKey:@"systemDiskType"];
    self.systemDiskIops = [dictionary objectForKey:@"systemDiskIops"];
    return self;
}
 @end
@implementation NodeNetwork
-(id) initWithPodSubnetId:(NSString*) podSubnetId
      nodeSubnetId:(NSString*)nodeSubnetId
      serviceSubnetId:(NSString*)serviceSubnetId
      servicePublicSubnetId:(NSString*)servicePublicSubnetId
      nodeNetworkCidr:(NSString*)nodeNetworkCidr
      vpcId:(NSString*)vpcId { 
     self.podSubnetId = podSubnetId;               
     self.nodeSubnetId = nodeSubnetId;               
     self.serviceSubnetId = serviceSubnetId;               
     self.servicePublicSubnetId = servicePublicSubnetId;               
     self.nodeNetworkCidr = nodeNetworkCidr;               
     self.vpcId = vpcId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self podSubnetId])
    {
        [result setValue:[self podSubnetId] forKey:@"podSubnetId"];
    }
    if([self nodeSubnetId])
    {
        [result setValue:[self nodeSubnetId] forKey:@"nodeSubnetId"];
    }
    if([self serviceSubnetId])
    {
        [result setValue:[self serviceSubnetId] forKey:@"serviceSubnetId"];
    }
    if([self servicePublicSubnetId])
    {
        [result setValue:[self servicePublicSubnetId] forKey:@"servicePublicSubnetId"];
    }
    if([self nodeNetworkCidr])
    {
        [result setValue:[self nodeNetworkCidr] forKey:@"nodeNetworkCidr"];
    }
    if([self vpcId])
    {
        [result setValue:[self vpcId] forKey:@"vpcId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.podSubnetId = [dictionary objectForKey:@"podSubnetId"];
    self.nodeSubnetId = [dictionary objectForKey:@"nodeSubnetId"];
    self.serviceSubnetId = [dictionary objectForKey:@"serviceSubnetId"];
    self.servicePublicSubnetId = [dictionary objectForKey:@"servicePublicSubnetId"];
    self.nodeNetworkCidr = [dictionary objectForKey:@"nodeNetworkCidr"];
    self.vpcId = [dictionary objectForKey:@"vpcId"];
    return self;
}
 @end
@implementation LabelSpec
-(id) initWithKey:(NSString*) key
      value:(NSString*)value { 
     self.key = key;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.key = [dictionary objectForKey:@"key"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation Tag
-(id) initWithKey:(NSString*) key
      value:(NSString*)value { 
     self.key = key;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.key = [dictionary objectForKey:@"key"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation KubernetesQuota
-(id) initWithResourceType:(NSString*) resourceType
      limit:(NSNumber*)limit
      used:(NSNumber*)used { 
     self.resourceType = resourceType;               
     self.limit = limit;               
     self.used = used;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceType])
    {
        [result setValue:[self resourceType] forKey:@"resourceType"];
    }
    if([self limit])
    {
        [result setValue:[self limit] forKey:@"limit"];
    }
    if([self used])
    {
        [result setValue:[self used] forKey:@"used"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceType = [dictionary objectForKey:@"resourceType"];
    self.limit = [dictionary objectForKey:@"limit"];
    self.used = [dictionary objectForKey:@"used"];
    return self;
}
 @end
@implementation MasterAuth
-(id) initWithClusterCaCertificate:(NSString*) clusterCaCertificate
      clientCertificate:(NSString*)clientCertificate
      clientKey:(NSString*)clientKey
      user:(NSString*)user
      password:(NSString*)password { 
     self.clusterCaCertificate = clusterCaCertificate;               
     self.clientCertificate = clientCertificate;               
     self.clientKey = clientKey;               
     self.user = user;               
     self.password = password;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self clusterCaCertificate])
    {
        [result setValue:[self clusterCaCertificate] forKey:@"clusterCaCertificate"];
    }
    if([self clientCertificate])
    {
        [result setValue:[self clientCertificate] forKey:@"clientCertificate"];
    }
    if([self clientKey])
    {
        [result setValue:[self clientKey] forKey:@"clientKey"];
    }
    if([self user])
    {
        [result setValue:[self user] forKey:@"user"];
    }
    if([self password])
    {
        [result setValue:[self password] forKey:@"password"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.clusterCaCertificate = [dictionary objectForKey:@"clusterCaCertificate"];
    self.clientCertificate = [dictionary objectForKey:@"clientCertificate"];
    self.clientKey = [dictionary objectForKey:@"clientKey"];
    self.user = [dictionary objectForKey:@"user"];
    self.password = [dictionary objectForKey:@"password"];
    return self;
}
 @end
@implementation KubernetesTagFilter
-(id) initWithKey:(NSString*) key
      values:(NSArray<NSString*>*)values { 
     self.key = key;               
     self.values = values;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self values])
    {
        [result setValue:[self values] forKey:@"values"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.key = [dictionary objectForKey:@"key"];
    self.values = [dictionary objectForKey:@"values"];
    return self;
}
 @end
@implementation UpgradePlan
-(id) initWithMode:(NSString*) mode
      scope:(NSString*)scope
      state:(NSString*)state
      masterExpectedVersion:(NSString*)masterExpectedVersion
      nodeExpectedVersion:(NSString*)nodeExpectedVersion
      startTime:(NSString*)startTime
      duration:(NSNumber*)duration { 
     self.mode = mode;               
     self.scope = scope;               
     self.state = state;               
     self.masterExpectedVersion = masterExpectedVersion;               
     self.nodeExpectedVersion = nodeExpectedVersion;               
     self.startTime = startTime;               
     self.duration = duration;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self mode])
    {
        [result setValue:[self mode] forKey:@"mode"];
    }
    if([self scope])
    {
        [result setValue:[self scope] forKey:@"scope"];
    }
    if([self state])
    {
        [result setValue:[self state] forKey:@"state"];
    }
    if([self masterExpectedVersion])
    {
        [result setValue:[self masterExpectedVersion] forKey:@"masterExpectedVersion"];
    }
    if([self nodeExpectedVersion])
    {
        [result setValue:[self nodeExpectedVersion] forKey:@"nodeExpectedVersion"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self duration])
    {
        [result setValue:[self duration] forKey:@"duration"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.mode = [dictionary objectForKey:@"mode"];
    self.scope = [dictionary objectForKey:@"scope"];
    self.state = [dictionary objectForKey:@"state"];
    self.masterExpectedVersion = [dictionary objectForKey:@"masterExpectedVersion"];
    self.nodeExpectedVersion = [dictionary objectForKey:@"nodeExpectedVersion"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.duration = [dictionary objectForKey:@"duration"];
    return self;
}
 @end
@implementation MasterProgress
-(id) initWithAction:(NSString*) action
      progress:(NSString*)progress { 
     self.action = action;               
     self.progress = progress;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self action])
    {
        [result setValue:[self action] forKey:@"action"];
    }
    if([self progress])
    {
        [result setValue:[self progress] forKey:@"progress"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.action = [dictionary objectForKey:@"action"];
    self.progress = [dictionary objectForKey:@"progress"];
    return self;
}
 @end
@implementation AddonConfigSpec
-(id) initWithName:(NSString*) name
      enabled:(NSNumber*)enabled { 
     self.name = name;               
     self.enabled = enabled;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    return self;
}
 @end
@implementation MaintenanceWindow
-(id) initWithPeriodType:(NSString*) periodType
      startDay:(NSNumber*)startDay
      startTime:(NSString*)startTime
      duration:(NSNumber*)duration { 
     self.periodType = periodType;               
     self.startDay = startDay;               
     self.startTime = startTime;               
     self.duration = duration;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self periodType])
    {
        [result setValue:[self periodType] forKey:@"periodType"];
    }
    if([self startDay])
    {
        [result setValue:[self startDay] forKey:@"startDay"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self duration])
    {
        [result setValue:[self duration] forKey:@"duration"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.periodType = [dictionary objectForKey:@"periodType"];
    self.startDay = [dictionary objectForKey:@"startDay"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.duration = [dictionary objectForKey:@"duration"];
    return self;
}
 @end
@implementation MaintenanceWindowSpec
-(id) initWithPeriodType:(NSString*) periodType
      startDay:(NSNumber*)startDay
      startTime:(NSString*)startTime
      timeZone:(NSString*)timeZone
      duration:(NSNumber*)duration { 
     self.periodType = periodType;               
     self.startDay = startDay;               
     self.startTime = startTime;               
     self.timeZone = timeZone;               
     self.duration = duration;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self periodType])
    {
        [result setValue:[self periodType] forKey:@"periodType"];
    }
    if([self startDay])
    {
        [result setValue:[self startDay] forKey:@"startDay"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self timeZone])
    {
        [result setValue:[self timeZone] forKey:@"timeZone"];
    }
    if([self duration])
    {
        [result setValue:[self duration] forKey:@"duration"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.periodType = [dictionary objectForKey:@"periodType"];
    self.startDay = [dictionary objectForKey:@"startDay"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.timeZone = [dictionary objectForKey:@"timeZone"];
    self.duration = [dictionary objectForKey:@"duration"];
    return self;
}
 @end
@implementation Label
-(id) initWithKey:(NSString*) key
      value:(NSString*)value { 
     self.key = key;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.key = [dictionary objectForKey:@"key"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation MasterImage
-(id) initWithCode:(NSString*) code
      imageId:(NSString*)imageId
      mainVersion:(NSString*)mainVersion
      innerVersion:(NSString*)innerVersion
      isDefault:(NSNumber*)isDefault
      visibility:(NSNumber*)visibility
      defaultNodeImageCode:(NSString*)defaultNodeImageCode
      nodeImages:(NSArray<NodeImage*>*)nodeImages { 
     self.code = code;               
     self.imageId = imageId;               
     self.mainVersion = mainVersion;               
     self.innerVersion = innerVersion;               
     self.isDefault = isDefault;               
     self.visibility = visibility;               
     self.defaultNodeImageCode = defaultNodeImageCode;               
     self.nodeImages = nodeImages;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self imageId])
    {
        [result setValue:[self imageId] forKey:@"imageId"];
    }
    if([self mainVersion])
    {
        [result setValue:[self mainVersion] forKey:@"mainVersion"];
    }
    if([self innerVersion])
    {
        [result setValue:[self innerVersion] forKey:@"innerVersion"];
    }
    if([self isDefault])
    {
        [result setValue:[self isDefault] forKey:@"isDefault"];
    }
    if([self visibility])
    {
        [result setValue:[self visibility] forKey:@"visibility"];
    }
    if([self defaultNodeImageCode])
    {
        [result setValue:[self defaultNodeImageCode] forKey:@"defaultNodeImageCode"];
    }
    if([self nodeImages])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self nodeImages] count]; i++) {
            NodeImage* item = [[self nodeImages] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"nodeImages"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.code = [dictionary objectForKey:@"code"];
    self.imageId = [dictionary objectForKey:@"imageId"];
    self.mainVersion = [dictionary objectForKey:@"mainVersion"];
    self.innerVersion = [dictionary objectForKey:@"innerVersion"];
    self.isDefault = [dictionary objectForKey:@"isDefault"];
    self.visibility = [dictionary objectForKey:@"visibility"];
    self.defaultNodeImageCode = [dictionary objectForKey:@"defaultNodeImageCode"];
    NSArray* nodeImagesArray = [dictionary objectForKey:@"nodeImages"];
    if(nodeImagesArray&&![nodeImagesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [nodeImagesArray count];i++)
        {
            NodeImage* item = [[NodeImage alloc]initWithDic:[nodeImagesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.nodeImages = propertyArray;
    }
    return self;
}
 @end
@implementation ServerConfig
-(id) initWithValidMasterVersions:(NSArray<NSString*>*) validMasterVersions
      defaultMasterVersion:(NSString*)defaultMasterVersion
      validNodeConfig:(NSArray<ValidNodeConfig*>*)validNodeConfig { 
     self.validMasterVersions = validMasterVersions;               
     self.defaultMasterVersion = defaultMasterVersion;               
     self.validNodeConfig = validNodeConfig;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self validMasterVersions])
    {
        [result setValue:[self validMasterVersions] forKey:@"validMasterVersions"];
    }
    if([self defaultMasterVersion])
    {
        [result setValue:[self defaultMasterVersion] forKey:@"defaultMasterVersion"];
    }
    if([self validNodeConfig])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self validNodeConfig] count]; i++) {
            ValidNodeConfig* item = [[self validNodeConfig] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"validNodeConfig"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.validMasterVersions = [dictionary objectForKey:@"validMasterVersions"];
    self.defaultMasterVersion = [dictionary objectForKey:@"defaultMasterVersion"];
    NSArray* validNodeConfigArray = [dictionary objectForKey:@"validNodeConfig"];
    if(validNodeConfigArray&&![validNodeConfigArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [validNodeConfigArray count];i++)
        {
            ValidNodeConfig* item = [[ValidNodeConfig alloc]initWithDic:[validNodeConfigArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.validNodeConfig = propertyArray;
    }
    return self;
}
 @end
@implementation NodeConfig
-(id) initWithInstanceType:(NSString*) instanceType
      imageId:(NSString*)imageId
      keyNames:(NSArray<NSString*>*)keyNames
      systemDiskCategory:(NSString*)systemDiskCategory
      systemDiskSize:(NSNumber*)systemDiskSize
      systemDiskType:(NSString*)systemDiskType
      systemDiskIops:(NSNumber*)systemDiskIops
      labels:(NSArray<LabelSpec*>*)labels { 
     self.instanceType = instanceType;               
     self.imageId = imageId;               
     self.keyNames = keyNames;               
     self.systemDiskCategory = systemDiskCategory;               
     self.systemDiskSize = systemDiskSize;               
     self.systemDiskType = systemDiskType;               
     self.systemDiskIops = systemDiskIops;               
     self.labels = labels;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instanceType])
    {
        [result setValue:[self instanceType] forKey:@"instanceType"];
    }
    if([self imageId])
    {
        [result setValue:[self imageId] forKey:@"imageId"];
    }
    if([self keyNames])
    {
        [result setValue:[self keyNames] forKey:@"keyNames"];
    }
    if([self systemDiskCategory])
    {
        [result setValue:[self systemDiskCategory] forKey:@"systemDiskCategory"];
    }
    if([self systemDiskSize])
    {
        [result setValue:[self systemDiskSize] forKey:@"systemDiskSize"];
    }
    if([self systemDiskType])
    {
        [result setValue:[self systemDiskType] forKey:@"systemDiskType"];
    }
    if([self systemDiskIops])
    {
        [result setValue:[self systemDiskIops] forKey:@"systemDiskIops"];
    }
    if([self labels])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self labels] count]; i++) {
            LabelSpec* item = [[self labels] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"labels"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceType = [dictionary objectForKey:@"instanceType"];
    self.imageId = [dictionary objectForKey:@"imageId"];
    self.keyNames = [dictionary objectForKey:@"keyNames"];
    self.systemDiskCategory = [dictionary objectForKey:@"systemDiskCategory"];
    self.systemDiskSize = [dictionary objectForKey:@"systemDiskSize"];
    self.systemDiskType = [dictionary objectForKey:@"systemDiskType"];
    self.systemDiskIops = [dictionary objectForKey:@"systemDiskIops"];
    NSArray* labelsArray = [dictionary objectForKey:@"labels"];
    if(labelsArray&&![labelsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [labelsArray count];i++)
        {
            LabelSpec* item = [[LabelSpec alloc]initWithDic:[labelsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.labels = propertyArray;
    }
    return self;
}
 @end
@implementation NodeConfigSpec
-(id) initWithInstanceType:(NSString*) instanceType
      version:(NSString*)version
      password:(NSString*)password
      keyNames:(NSArray<NSString*>*)keyNames
      systemDisk:(DiskSpec*)systemDisk
      labels:(NSArray<LabelSpec*>*)labels { 
     self.instanceType = instanceType;               
     self.version = version;               
     self.password = password;               
     self.keyNames = keyNames;               
     self.systemDisk = systemDisk;               
     self.labels = labels;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instanceType])
    {
        [result setValue:[self instanceType] forKey:@"instanceType"];
    }
    if([self version])
    {
        [result setValue:[self version] forKey:@"version"];
    }
    if([self password])
    {
        [result setValue:[self password] forKey:@"password"];
    }
    if([self keyNames])
    {
        [result setValue:[self keyNames] forKey:@"keyNames"];
    }
    if([self systemDisk])
    {
        [result setValue:[[self systemDisk] dictionary]forKey:@"systemDisk"];
    }
    if([self labels])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self labels] count]; i++) {
            LabelSpec* item = [[self labels] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"labels"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceType = [dictionary objectForKey:@"instanceType"];
    self.version = [dictionary objectForKey:@"version"];
    self.password = [dictionary objectForKey:@"password"];
    self.keyNames = [dictionary objectForKey:@"keyNames"];
    self.systemDisk = [[DiskSpec alloc]initWithDic:[dictionary objectForKey:@"systemDisk"]];
    NSArray* labelsArray = [dictionary objectForKey:@"labels"];
    if(labelsArray&&![labelsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [labelsArray count];i++)
        {
            LabelSpec* item = [[LabelSpec alloc]initWithDic:[labelsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.labels = propertyArray;
    }
    return self;
}
 @end
@implementation MasterVersion
-(id) initWithVersion:(NSString*) version
      isDefault:(NSNumber*)isDefault
      defaultNodeVersion:(NSString*)defaultNodeVersion
      versionStatus:(NSString*)versionStatus
      nodeVersions:(NSArray<NodeVersion*>*)nodeVersions { 
     self.version = version;               
     self.isDefault = isDefault;               
     self.defaultNodeVersion = defaultNodeVersion;               
     self.versionStatus = versionStatus;               
     self.nodeVersions = nodeVersions;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self version])
    {
        [result setValue:[self version] forKey:@"version"];
    }
    if([self isDefault])
    {
        [result setValue:[self isDefault] forKey:@"isDefault"];
    }
    if([self defaultNodeVersion])
    {
        [result setValue:[self defaultNodeVersion] forKey:@"defaultNodeVersion"];
    }
    if([self versionStatus])
    {
        [result setValue:[self versionStatus] forKey:@"versionStatus"];
    }
    if([self nodeVersions])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self nodeVersions] count]; i++) {
            NodeVersion* item = [[self nodeVersions] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"nodeVersions"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.version = [dictionary objectForKey:@"version"];
    self.isDefault = [dictionary objectForKey:@"isDefault"];
    self.defaultNodeVersion = [dictionary objectForKey:@"defaultNodeVersion"];
    self.versionStatus = [dictionary objectForKey:@"versionStatus"];
    NSArray* nodeVersionsArray = [dictionary objectForKey:@"nodeVersions"];
    if(nodeVersionsArray&&![nodeVersionsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [nodeVersionsArray count];i++)
        {
            NodeVersion* item = [[NodeVersion alloc]initWithDic:[nodeVersionsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.nodeVersions = propertyArray;
    }
    return self;
}
 @end
@implementation NodeGroupSpec
-(id) initWithName:(NSString*) name
      descriptionValue:(NSString*)descriptionValue
      nodeConfig:(NodeConfigSpec*)nodeConfig
      azs:(NSArray<NSString*>*)azs
      initialNodeCount:(NSNumber*)initialNodeCount
      vpcId:(NSString*)vpcId
      nodeCidr:(NSString*)nodeCidr
      autoRepair:(NSNumber*)autoRepair { 
     self.name = name;               
     self.descriptionValue = descriptionValue;               
     self.nodeConfig = nodeConfig;               
     self.azs = azs;               
     self.initialNodeCount = initialNodeCount;               
     self.vpcId = vpcId;               
     self.nodeCidr = nodeCidr;               
     self.autoRepair = autoRepair;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self nodeConfig])
    {
        [result setValue:[[self nodeConfig] dictionary]forKey:@"nodeConfig"];
    }
    if([self azs])
    {
        [result setValue:[self azs] forKey:@"azs"];
    }
    if([self initialNodeCount])
    {
        [result setValue:[self initialNodeCount] forKey:@"initialNodeCount"];
    }
    if([self vpcId])
    {
        [result setValue:[self vpcId] forKey:@"vpcId"];
    }
    if([self nodeCidr])
    {
        [result setValue:[self nodeCidr] forKey:@"nodeCidr"];
    }
    if([self autoRepair])
    {
        [result setValue:[self autoRepair] forKey:@"autoRepair"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.nodeConfig = [[NodeConfigSpec alloc]initWithDic:[dictionary objectForKey:@"nodeConfig"]];
    self.azs = [dictionary objectForKey:@"azs"];
    self.initialNodeCount = [dictionary objectForKey:@"initialNodeCount"];
    self.vpcId = [dictionary objectForKey:@"vpcId"];
    self.nodeCidr = [dictionary objectForKey:@"nodeCidr"];
    self.autoRepair = [dictionary objectForKey:@"autoRepair"];
    return self;
}
 @end
@implementation NodeGroup
-(id) initWithClusterId:(NSString*) clusterId
      nodeGroupId:(NSString*)nodeGroupId
      name:(NSString*)name
      descriptionValue:(NSString*)descriptionValue
      nodeConfig:(NodeConfig*)nodeConfig
      version:(NSString*)version
      nodeNetwork:(NodeNetwork*)nodeNetwork
      currentCount:(NSNumber*)currentCount
      expectCount:(NSNumber*)expectCount
      agId:(NSString*)agId
      azs:(NSArray<NSString*>*)azs
      instanceTemplateId:(NSString*)instanceTemplateId
      state:(NSString*)state
      tags:(NSArray<Tag*>*)tags
      updateTime:(NSString*)updateTime
      stateMessage:(NSString*)stateMessage
      autoRepair:(NSNumber*)autoRepair
      progress:(NodeGroupProgress*)progress
      createdTime:(NSString*)createdTime { 
     self.clusterId = clusterId;               
     self.nodeGroupId = nodeGroupId;               
     self.name = name;               
     self.descriptionValue = descriptionValue;               
     self.nodeConfig = nodeConfig;               
     self.version = version;               
     self.nodeNetwork = nodeNetwork;               
     self.currentCount = currentCount;               
     self.expectCount = expectCount;               
     self.agId = agId;               
     self.azs = azs;               
     self.instanceTemplateId = instanceTemplateId;               
     self.state = state;               
     self.tags = tags;               
     self.updateTime = updateTime;               
     self.stateMessage = stateMessage;               
     self.autoRepair = autoRepair;               
     self.progress = progress;               
     self.createdTime = createdTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self clusterId])
    {
        [result setValue:[self clusterId] forKey:@"clusterId"];
    }
    if([self nodeGroupId])
    {
        [result setValue:[self nodeGroupId] forKey:@"nodeGroupId"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self nodeConfig])
    {
        [result setValue:[[self nodeConfig] dictionary]forKey:@"nodeConfig"];
    }
    if([self version])
    {
        [result setValue:[self version] forKey:@"version"];
    }
    if([self nodeNetwork])
    {
        [result setValue:[[self nodeNetwork] dictionary]forKey:@"nodeNetwork"];
    }
    if([self currentCount])
    {
        [result setValue:[self currentCount] forKey:@"currentCount"];
    }
    if([self expectCount])
    {
        [result setValue:[self expectCount] forKey:@"expectCount"];
    }
    if([self agId])
    {
        [result setValue:[self agId] forKey:@"agId"];
    }
    if([self azs])
    {
        [result setValue:[self azs] forKey:@"azs"];
    }
    if([self instanceTemplateId])
    {
        [result setValue:[self instanceTemplateId] forKey:@"instanceTemplateId"];
    }
    if([self state])
    {
        [result setValue:[self state] forKey:@"state"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            Tag* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    if([self stateMessage])
    {
        [result setValue:[self stateMessage] forKey:@"stateMessage"];
    }
    if([self autoRepair])
    {
        [result setValue:[self autoRepair] forKey:@"autoRepair"];
    }
    if([self progress])
    {
        [result setValue:[[self progress] dictionary]forKey:@"progress"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.clusterId = [dictionary objectForKey:@"clusterId"];
    self.nodeGroupId = [dictionary objectForKey:@"nodeGroupId"];
    self.name = [dictionary objectForKey:@"name"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.nodeConfig = [[NodeConfig alloc]initWithDic:[dictionary objectForKey:@"nodeConfig"]];
    self.version = [dictionary objectForKey:@"version"];
    self.nodeNetwork = [[NodeNetwork alloc]initWithDic:[dictionary objectForKey:@"nodeNetwork"]];
    self.currentCount = [dictionary objectForKey:@"currentCount"];
    self.expectCount = [dictionary objectForKey:@"expectCount"];
    self.agId = [dictionary objectForKey:@"agId"];
    self.azs = [dictionary objectForKey:@"azs"];
    self.instanceTemplateId = [dictionary objectForKey:@"instanceTemplateId"];
    self.state = [dictionary objectForKey:@"state"];
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            Tag* item = [[Tag alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    self.stateMessage = [dictionary objectForKey:@"stateMessage"];
    self.autoRepair = [dictionary objectForKey:@"autoRepair"];
    self.progress = [[NodeGroupProgress alloc]initWithDic:[dictionary objectForKey:@"progress"]];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    return self;
}
 @end
@implementation ClusterSpec
-(id) initWithName:(NSString*) name
      descriptionValue:(NSString*)descriptionValue
      basicAuth:(NSNumber*)basicAuth
      clientCertificate:(NSNumber*)clientCertificate
      version:(NSString*)version
      azs:(NSArray<NSString*>*)azs
      nodeGroup:(NodeGroupSpec*)nodeGroup
      masterCIDR:(NSString*)masterCIDR
      accessKey:(NSString*)accessKey
      secretKey:(NSString*)secretKey { 
     self.name = name;               
     self.descriptionValue = descriptionValue;               
     self.basicAuth = basicAuth;               
     self.clientCertificate = clientCertificate;               
     self.version = version;               
     self.azs = azs;               
     self.nodeGroup = nodeGroup;               
     self.masterCIDR = masterCIDR;               
     self.accessKey = accessKey;               
     self.secretKey = secretKey;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self basicAuth])
    {
        [result setValue:[self basicAuth] forKey:@"basicAuth"];
    }
    if([self clientCertificate])
    {
        [result setValue:[self clientCertificate] forKey:@"clientCertificate"];
    }
    if([self version])
    {
        [result setValue:[self version] forKey:@"version"];
    }
    if([self azs])
    {
        [result setValue:[self azs] forKey:@"azs"];
    }
    if([self nodeGroup])
    {
        [result setValue:[[self nodeGroup] dictionary]forKey:@"nodeGroup"];
    }
    if([self masterCIDR])
    {
        [result setValue:[self masterCIDR] forKey:@"masterCIDR"];
    }
    if([self accessKey])
    {
        [result setValue:[self accessKey] forKey:@"accessKey"];
    }
    if([self secretKey])
    {
        [result setValue:[self secretKey] forKey:@"secretKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.basicAuth = [dictionary objectForKey:@"basicAuth"];
    self.clientCertificate = [dictionary objectForKey:@"clientCertificate"];
    self.version = [dictionary objectForKey:@"version"];
    self.azs = [dictionary objectForKey:@"azs"];
    self.nodeGroup = [[NodeGroupSpec alloc]initWithDic:[dictionary objectForKey:@"nodeGroup"]];
    self.masterCIDR = [dictionary objectForKey:@"masterCIDR"];
    self.accessKey = [dictionary objectForKey:@"accessKey"];
    self.secretKey = [dictionary objectForKey:@"secretKey"];
    return self;
}
 @end
@implementation Cluster
-(id) initWithClusterId:(NSString*) clusterId
      name:(NSString*)name
      descriptionValue:(NSString*)descriptionValue
      version:(NSString*)version
      azs:(NSArray<NSString*>*)azs
      nodeGroups:(NSArray<NodeGroup*>*)nodeGroups
      clusterCidr:(NSString*)clusterCidr
      masterAuth:(MasterAuth*)masterAuth
      clusterState:(NSString*)clusterState
      stateMessage:(NSString*)stateMessage
      updateTime:(NSString*)updateTime
      createTime:(NSString*)createTime
      accessKey:(NSString*)accessKey
      basicAuth:(NSNumber*)basicAuth
      clientCertificate:(NSNumber*)clientCertificate
      endpoint:(NSString*)endpoint
      endpointPort:(NSString*)endpointPort
      dashboardPort:(NSString*)dashboardPort
      userMetrics:(NSNumber*)userMetrics
      addonsConfig:(NSArray<AddonConfig*>*)addonsConfig
      autoUpgrade:(NSNumber*)autoUpgrade
      maintenanceWindow:(MaintenanceWindow*)maintenanceWindow
      upgradePlan:(UpgradePlan*)upgradePlan
      masterProgress:(MaintenanceWindow*)masterProgress { 
     self.clusterId = clusterId;               
     self.name = name;               
     self.descriptionValue = descriptionValue;               
     self.version = version;               
     self.azs = azs;               
     self.nodeGroups = nodeGroups;               
     self.clusterCidr = clusterCidr;               
     self.masterAuth = masterAuth;               
     self.clusterState = clusterState;               
     self.stateMessage = stateMessage;               
     self.updateTime = updateTime;               
     self.createTime = createTime;               
     self.accessKey = accessKey;               
     self.basicAuth = basicAuth;               
     self.clientCertificate = clientCertificate;               
     self.endpoint = endpoint;               
     self.endpointPort = endpointPort;               
     self.dashboardPort = dashboardPort;               
     self.userMetrics = userMetrics;               
     self.addonsConfig = addonsConfig;               
     self.autoUpgrade = autoUpgrade;               
     self.maintenanceWindow = maintenanceWindow;               
     self.upgradePlan = upgradePlan;               
     self.masterProgress = masterProgress;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self clusterId])
    {
        [result setValue:[self clusterId] forKey:@"clusterId"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self version])
    {
        [result setValue:[self version] forKey:@"version"];
    }
    if([self azs])
    {
        [result setValue:[self azs] forKey:@"azs"];
    }
    if([self nodeGroups])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self nodeGroups] count]; i++) {
            NodeGroup* item = [[self nodeGroups] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"nodeGroups"];
    }
    if([self clusterCidr])
    {
        [result setValue:[self clusterCidr] forKey:@"clusterCidr"];
    }
    if([self masterAuth])
    {
        [result setValue:[[self masterAuth] dictionary]forKey:@"masterAuth"];
    }
    if([self clusterState])
    {
        [result setValue:[self clusterState] forKey:@"clusterState"];
    }
    if([self stateMessage])
    {
        [result setValue:[self stateMessage] forKey:@"stateMessage"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self accessKey])
    {
        [result setValue:[self accessKey] forKey:@"accessKey"];
    }
    if([self basicAuth])
    {
        [result setValue:[self basicAuth] forKey:@"basicAuth"];
    }
    if([self clientCertificate])
    {
        [result setValue:[self clientCertificate] forKey:@"clientCertificate"];
    }
    if([self endpoint])
    {
        [result setValue:[self endpoint] forKey:@"endpoint"];
    }
    if([self endpointPort])
    {
        [result setValue:[self endpointPort] forKey:@"endpointPort"];
    }
    if([self dashboardPort])
    {
        [result setValue:[self dashboardPort] forKey:@"dashboardPort"];
    }
    if([self userMetrics])
    {
        [result setValue:[self userMetrics] forKey:@"userMetrics"];
    }
    if([self addonsConfig])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self addonsConfig] count]; i++) {
            AddonConfig* item = [[self addonsConfig] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"addonsConfig"];
    }
    if([self autoUpgrade])
    {
        [result setValue:[self autoUpgrade] forKey:@"autoUpgrade"];
    }
    if([self maintenanceWindow])
    {
        [result setValue:[[self maintenanceWindow] dictionary]forKey:@"maintenanceWindow"];
    }
    if([self upgradePlan])
    {
        [result setValue:[[self upgradePlan] dictionary]forKey:@"upgradePlan"];
    }
    if([self masterProgress])
    {
        [result setValue:[[self masterProgress] dictionary]forKey:@"masterProgress"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.clusterId = [dictionary objectForKey:@"clusterId"];
    self.name = [dictionary objectForKey:@"name"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.version = [dictionary objectForKey:@"version"];
    self.azs = [dictionary objectForKey:@"azs"];
    NSArray* nodeGroupsArray = [dictionary objectForKey:@"nodeGroups"];
    if(nodeGroupsArray&&![nodeGroupsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [nodeGroupsArray count];i++)
        {
            NodeGroup* item = [[NodeGroup alloc]initWithDic:[nodeGroupsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.nodeGroups = propertyArray;
    }
    self.clusterCidr = [dictionary objectForKey:@"clusterCidr"];
    self.masterAuth = [[MasterAuth alloc]initWithDic:[dictionary objectForKey:@"masterAuth"]];
    self.clusterState = [dictionary objectForKey:@"clusterState"];
    self.stateMessage = [dictionary objectForKey:@"stateMessage"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.accessKey = [dictionary objectForKey:@"accessKey"];
    self.basicAuth = [dictionary objectForKey:@"basicAuth"];
    self.clientCertificate = [dictionary objectForKey:@"clientCertificate"];
    self.endpoint = [dictionary objectForKey:@"endpoint"];
    self.endpointPort = [dictionary objectForKey:@"endpointPort"];
    self.dashboardPort = [dictionary objectForKey:@"dashboardPort"];
    self.userMetrics = [dictionary objectForKey:@"userMetrics"];
    NSArray* addonsConfigArray = [dictionary objectForKey:@"addonsConfig"];
    if(addonsConfigArray&&![addonsConfigArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [addonsConfigArray count];i++)
        {
            AddonConfig* item = [[AddonConfig alloc]initWithDic:[addonsConfigArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.addonsConfig = propertyArray;
    }
    self.autoUpgrade = [dictionary objectForKey:@"autoUpgrade"];
    self.maintenanceWindow = [[MaintenanceWindow alloc]initWithDic:[dictionary objectForKey:@"maintenanceWindow"]];
    self.upgradePlan = [[UpgradePlan alloc]initWithDic:[dictionary objectForKey:@"upgradePlan"]];
    self.masterProgress = [[MaintenanceWindow alloc]initWithDic:[dictionary objectForKey:@"masterProgress"]];
    return self;
}
 @end
 
 


